+2007-04-29 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtkprintoperation.c (gtk_print_operation_run): Document
+ that a print operation can be run only once, and add a
+ corresponding g_return_if_fail(). (#379399, Masao Mutoh)
+
2007-04-29 Dan Winship <danw@novell.com>
* gdk/x11/gdkdisplay-x11.c
* @error: Return location for errors, or %NULL
*
* Runs the print operation, by first letting the user modify
- * print settings in the print dialog, and then print the
- * document.
+ * print settings in the print dialog, and then print the document.
*
* Normally that this function does not return until the rendering of all
* pages is complete. You can connect to the ::status-changed signal on
* }
* </programlisting></informalexample>
*
+ * Note that gtk_print_operation_run() can only be called once on a
+ * given #GtkPrintOperation.
+ *
* Return value: the result of the print operation. A return value of
* %GTK_PRINT_OPERATION_RESULT_APPLY indicates that the printing was
* completed successfully. In this case, it is a good idea to obtain
g_return_val_if_fail (GTK_IS_PRINT_OPERATION (op),
GTK_PRINT_OPERATION_RESULT_ERROR);
-
+ g_return_val_if_fail (op->priv->status == GTK_PRINT_STATUS_INITIAL,
+ GTK_PRINT_OPERATION_RESULT_ERROR);
priv = op->priv;
-
+
run_print_pages = TRUE;
do_print = FALSE;
priv->error = NULL;